/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
}

.container {
    display: grid;
    grid-template-columns: 200px 1fr;
    grid-template-rows: 60px 1fr;
    min-height: 100vh;
}

header {
    grid-column: 1 / 3;
    background-color: #2c3e50;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

header h1 {
    font-size: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info a {
    color: white;
    text-decoration: none;
}

/* 侧边栏 */
.sidebar {
    background-color: #34495e;
    color: white;
    padding: 20px 0;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    padding: 10px 20px;
}

.sidebar li a {
    color: white;
    text-decoration: none;
    display: block;
}

.sidebar li.active {
    background-color: #2c3e50;
}

.sidebar li:hover {
    background-color: #3d566e;
}

/* 主内容区 */
.content {
    padding: 20px;
    background-color: white;
}

.search-bar {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.search-bar input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex-grow: 1;
}

.search-bar button {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
}

tr:hover {
    background-color: #f5f5f5;
}

.no-access td {
    color: #999;
    font-style: italic;
}

/* 进度条 */
.progress-bar {
    background-color: #3498db;
    color: white;
    text-align: center;
    border-radius: 3px;
    padding: 2px 0;
}

/* 项目信息网格 */
.info-grid {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 10px;
    margin: 15px 0;
}

.info-grid div:nth-child(odd) {
    font-weight: bold;
}

/* 按钮样式 */
button {
    padding: 6px 12px;
    margin-right: 5px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.btn-upload {
    background-color: #2ecc71;
    color: white;
}

.btn-delete {
    background-color: #e74c3c;
    color: white;
}

.btn-edit {
    background-color: #3498db;
    color: white;
}

/* 个人信息页特定样式 */
.personal-content {
    max-width: 600px;
    margin: 0 auto;
}

.project-list {
    list-style: none;
    margin: 15px 0;
}

.project-list li {
    padding: 8px 0;
    display: flex;
    align-items: center;
}

.project-list input {
    margin-right: 10px;
}

.actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.btn-change-pw {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
}

.btn-logout {
    background-color: #e74c3c;
    color: white;
    padding: 10px 20px;
}
/* 导航栏基础样式 */
.sidebar {
    background-color: #2c3e50;
    padding: 20px 0;
}

.sidebar a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 10px 20px;
    transition: background-color 0.3s;
}

.sidebar a:hover {
    background-color: #34495e;
}

/* 当前页面高亮 */
.sidebar a.active {
    background-color: #3498db;
    font-weight: bold;
}
/* 导航栏链接样式 */
.nav-link {
    color: var(--text-light);
    padding: 12px 25px;
    display: block;
    font-size: 0.95rem;
    opacity: 0.9;
    transition: all 0.3s;
    text-decoration: none;
    position: relative;
}

.nav-link:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    opacity: 1;
    font-weight: 500;
    background-color: rgba(0, 0, 0, 0.2);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--primary-color);
}

/* 状态标签 */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-completed {
    background-color: #cce5ff;
    color: #004085;
}

.status-paused {
    background-color: #fff3cd;
    color: #856404;
}

/* 按钮样式 */
.btn-view, .btn-git {
    padding: 4px 8px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
    display: inline-block;
    margin: 2px;
}

.btn-view {
    background-color: #007bff;
    color: white;
}

.btn-git {
    background-color: #28a745;
    color: white;
}

.btn-view:hover, .btn-git:hover {
    opacity: 0.8;
}

/* 项目列表页面样式 */
.projects-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.project-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #007bff;
}

.project-card h3 {
    margin-top: 0;
    color: #333;
}

.project-card p {
    margin: 8px 0;
    color: #666;
}

.project-card a {
    color: #007bff;
    text-decoration: none;
}

.project-card a:hover {
    text-decoration: underline;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
    background-color: #f8d7da;
    border-radius: 8px;
    margin: 20px 0;
}

.no-projects {
    text-align: center;
    padding: 40px;
    color: #666;
}

.error-message {
    color: #ff4444;
    background-color: #ffe6e6;
    border: 1px solid #ffcccc;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
}
